<template>
    <!-- 首页 -->
    <div class="base-width">
        <el-carousel class="carousel" :interval="4000" type="card">
            <el-carousel-item v-for="item in img" :key="item.id">
                <img :src="item.picture" alt="">
            </el-carousel-item>
        </el-carousel>
        <!-- 近期热门 -->
        <div class="part">
            <div class="left-part">
                <!-- 标题部分 -->
                <div>
                    <p>近期热门</p>
                    <a href="">查看更多</a>
                </div>

                <!-- 内容部分 -->
                <div class="left-part-zi">
                    <div class="left-part-li" @click="$router.push('/content/buy')">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                    <div class="left-part-li">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                    <div class="left-part-li">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                    <div class="left-part-li">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                    <div class="left-part-li">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                    <div class="left-part-li">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                    <div class="left-part-li">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                    <div class="left-part-li">
                        <img src="../../assets/img/33.jpg" alt="">
                        <div class="part-li">
                            <p>【西安站】「李荣浩」《纵横四海》巡回演唱会 【西安站】「李荣浩」《纵横四海》巡回演唱会</p>

                        </div>
                        <div class="part-li2">
                            <span>420</span>
                            <span>元起</span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="right-part">
                <div>
                    <p>人气TOP5</p>
                    <a href="">查看更多</a>
                </div>

                <!-- 内容部分 -->
                <div class="right-part-zi">
                    <div class="right-part-li">
                        <div class="part-li">1</div>
                        <img src="../../assets/img/2.jpg" alt="">
                        <ul>
                            <li class="part-la">【西安站】「薛之谦」《天外来物》巡回演唱会</li>
                            <li>2023.07.01 19:30</li>
                            <li>西安奥体中心体育场</li>
                        </ul>
                    </div>

                    <div class="right-part-li2">
                        <div class="part-li">2</div>
                        <ul>
                            <li class="part-la">【西安站】「张信哲」《未来式2.0》2023巡回演唱会</li>
                            <li>2023.05.27 19:30</li>
                            <li>西安省体育场</li>
                        </ul>
                    </div>

                    <div class="right-part-li2">
                        <div class="part-li">3</div>
                        <ul>
                            <li class="part-la">【西安站】「张信哲」《未来式2.0》2023巡回演唱会</li>
                            <li>2023.05.27 19:30</li>
                            <li>西安省体育场</li>
                        </ul>
                    </div>

                    <div class="right-part-li2">
                        <div class="part-li">4</div>
                        <ul>
                            <li class="part-la">【西安站】「张信哲」《未来式2.0》2023巡回演唱会</li>
                            <li>2023.05.27 19:30</li>
                            <li>西安省体育场</li>
                        </ul>
                    </div>

                    <div class="right-part-li2">
                        <div class="part-li">5</div>
                        <ul>
                            <li class="part-la">【西安站】「张信哲」《未来式2.0》2023巡回演唱会</li>
                            <li>2023.05.27 19:30</li>
                            <li>西安省体育场</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <!-- 折扣专区 -->
        <div class="section">
            <!-- 标题部分 -->
            <div class="part-section">
                <p>折扣专区</p>
                <a href="">查看更多</a>
            </div>

            <!-- 内容部分 -->
            <div class="part-section-zi">
                <div class="part-section-li">
                    <div class="section-li">
                        <img src="../../assets/img/40.png" alt="">
                        <div class="section-ss">
                            <div class="ss">6.0</div>
                            <div>折起</div>
                        </div>
                    </div>

                    <div class="section-li2">
                        <p>【西安站】《印象陕北》“沉浸式”陕北民歌特色演出</p>
                    </div>

                    <div class="section-li3">
                        <span>88</span>
                        <span>元起</span>
                    </div>
                </div>
                <div class="part-section-li">
                    <div class="section-li">
                        <img src="../../assets/img/40.png" alt="">
                        <div class="section-ss">
                            <div class="ss">6.0</div>
                            <div>折起</div>
                        </div>
                    </div>

                    <div class="section-li2">
                        <p>【西安站】《印象陕北》“沉浸式”陕北民歌特色演出</p>
                    </div>

                    <div class="section-li3">
                        <span>88</span>
                        <span>元起</span>
                    </div>
                </div>
                <div class="part-section-li">
                    <div class="section-li">
                        <img src="../../assets/img/40.png" alt="">
                        <div class="section-ss">
                            <div class="ss">6.0</div>
                            <div>折起</div>
                        </div>
                    </div>

                    <div class="section-li2">
                        <p>【西安站】《印象陕北》“沉浸式”陕北民歌特色演出</p>
                    </div>

                    <div class="section-li3">
                        <span>88</span>
                        <span>元起</span>
                    </div>
                </div>
                <div class="part-section-li">
                    <div class="section-li">
                        <img src="../../assets/img/40.png" alt="">
                        <div class="section-ss">
                            <div class="ss">6.0</div>
                            <div>折起</div>
                        </div>
                    </div>

                    <div class="section-li2">
                        <p>【西安站】《印象陕北》“沉浸式”陕北民歌特色演出</p>
                    </div>

                    <div class="section-li3">
                        <span>88</span>
                        <span>元起</span>
                    </div>
                </div>
                <div class="part-section-li">
                    <div class="section-li">
                        <img src="../../assets/img/40.png" alt="">
                        <div class="section-ss">
                            <div class="ss">6.0</div>
                            <div>折起</div>
                        </div>
                    </div>

                    <div class="section-li2">
                        <p>【西安站】《印象陕北》“沉浸式”陕北民歌特色演出</p>
                    </div>

                    <div class="section-li3">
                        <span>88</span>
                        <span>元起</span>
                    </div>
                </div>
                <div class="part-section-li">
                    <div class="section-li">
                        <img src="../../assets/img/40.png" alt="">
                        <div class="section-ss">
                            <div class="ss">6.0</div>
                            <div>折起</div>
                        </div>
                    </div>

                    <div class="section-li2">
                        <p>【西安站】《印象陕北》“沉浸式”陕北民歌特色演出</p>
                    </div>

                    <div class="section-li3">
                        <span>88</span>
                        <span>元起</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- 演唱会 -->
        <div class="show" v-for="type, index in showTypes" :key="type.marketingOID">
            <!-- 标题部分 -->
            <div class="part-show">
                <p>{{ type.marketingName }}</p>
                <a href="">查看更多</a>
            </div>

            <!-- 内容部分 -->
            <div class="part-show-zi">
                <div class="part-show-li">
                    <img :src="type.shows[0].posterURL" alt="">
                    <div>{{ type.shows[0].showName }}</div>
                </div>

                <div class="part-show-li2">
                    <div class="show-li2" @click="$router.push('/content/buy')" v-for="show, index in type.shows">
                        <template v-if="index <= 5">

                            <img :src="show.posterURL" alt="">
                            <div>
                                <ul>
                                    <li class="part-la">{{ show.showName }}</li>
                                    <li>{{ show.showDate }}</li>
                                    <li class="singleLine"> {{ show.venueName }}</li>
                                </ul>
                                <div class="part-li2">
                                    <span>{{ show.minPrice }}</span>
                                    <span>元起</span>
                                </div>
                            </div>
                        </template>
                    </div>

                </div>
            </div>
        </div>



        <!-- 演出日历 -->
        <div class="page">
            <!-- 标题部分 -->
            <p>演出日历</p>

            <!-- 内容部分 -->
            <div class="page-section">
                <!-- 左侧日历 -->
                <div class="page-section-left">
                    <img src="../../assets/img/14.jpg" alt="">
                </div>

                <!-- 右侧演出 -->
                <div class="page-section-right">
                    <div class="page-show-li">
                        <div>
                            <p>2023-6-12 共有</p>
                            <span> 4 </span>
                            <p>场演出</p>
                        </div>
                        <a href="">查看更多</a>
                    </div>

                    <div class="page-show-li2">
                        <div class="show-li2">
                            <img src="../../assets/img/11.jpg" alt="">
                            <ul>
                                <li class="part-la">【西安站】「薛之谦」《天外来物》巡回演唱会</li>
                                <li>2023.07.01 19:30</li>
                            </ul>
                        </div>
                        <div class="show-li2">
                            <img src="../../assets/img/11.jpg" alt="">
                            <ul>
                                <li class="part-la">【西安站】「薛之谦」《天外来物》巡回演唱会</li>
                                <li>2023.07.01 19:30</li>
                            </ul>
                        </div>
                        <div class="show-li2">
                            <img src="../../assets/img/11.jpg" alt="">
                            <ul>
                                <li class="part-la">【西安站】「薛之谦」《天外来物》巡回演唱会</li>
                                <li>2023.07.01 19:30</li>
                            </ul>
                        </div>
                        <div class="show-li2">
                            <img src="../../assets/img/11.jpg" alt="">
                            <ul>
                                <li class="part-la">【西安站】「薛之谦」《天外来物》巡回演唱会</li>
                                <li>2023.07.01 19:30</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="small">
            <img src="../../assets/img/21.png" alt="">
            <img src="../../assets/img/29.png" alt="">
        </div>
        <login />
    </div>
</template>

<script>
import httpApi from '@/http/index'
import login from '@/components/Login.vue'
export default {
    components: {
        login
    },
    data() {
        return {
            img: [],
            showTypes: []
        }
    },
    methods: {
        // 获取轮播图信息
        getCarougelInfo() {
            httpApi.indexApi.indexImg().then(res => {
                this.img = res.data.data.result
                // console.log(this.img)
            })
        },
        // 获取前台展示信息
        async getTypeShowInfo() {
            let params = { src: 'web', siteCityOID: 6101 }
            let { data: { result: { statusCode, data: { showTypes } } } } = await httpApi.ticketsApi.getShowInfo(params)
            this.showTypes = showTypes;
            console.log(showTypes);
        }
    },
    mounted() {
        this.getCarougelInfo();
        this.getTypeShowInfo();
    },

}

</script>

<style lang="scss" scoped>
.singleLine {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.base-width {
    .carousel {
        transform: scale(1.1);
    }
}

div {
    display: flex;

}

.base-width {
    display: flex;
    flex-direction: column;

    .carousel {
        display: block;
    }

    .el-carousel__item img {
        color: #475669;
        font-size: 14px;
        opacity: 0.75;
        line-height: 200px;
        margin: 0;
        object-fit: fill;
        width: 100%;
    }

    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
        border-radius: 8px;
    }

    .el-carousel__item:nth-child(2n+1) {
        background-color: #d3dce6;
        border-radius: 8px;
    }

    >.part {
        justify-content: space-between;
        padding: 40px 0 40px 0;

        >.left-part {
            display: block;

            >div {
                display: flex;
                justify-content: space-between;
                align-items: center;

                >p {
                    font-size: 30px;
                    height: 40px;
                    line-height: 40px;
                    display: block;
                }

                >a {
                    font-size: 20px;
                }
            }

            >.left-part-zi {
                flex-wrap: wrap;

                >.left-part-li {
                    padding-top: 30px;
                    width: 21%;
                    display: flex;
                    flex-direction: column;
                    line-height: 22px;

                    >img {
                        width: 100%;
                        border-radius: 6px;
                        margin-bottom: 10px;

                    }

                    >.part-li {

                        >p {
                            overflow: hidden;
                            text-overflow: ellipsis;
                            display: -webkit-box;
                            -webkit-line-clamp: 2;
                            line-clamp: 2;
                            -webkit-box-orient: vertical;
                            width: 150px;
                            flex-wrap: wrap;
                            font-size: 10px;

                        }

                    }

                    >.part-li2 {
                        padding-top: 5px;
                        color: #ff4655;
                        // align-items: flex-end;

                        >span:nth-child(1) {
                            font-size: 20px;
                            line-height: 20px;
                        }

                        >span {
                            font-size: 0.7em;
                        }
                    }

                }
            }

        }

        >.right-part {
            display: block;
            margin-left: 50px;
            width: 100%;

            >div {
                display: flex;
                justify-content: space-between;
                align-items: center;

                >p {
                    font-size: 30px;
                    height: 40px;
                    line-height: 40px;
                    display: block;
                }

                >a {
                    font-size: 20px;
                }
            }

            >.right-part-zi {
                display: flex;
                flex-direction: column;


                >.right-part-li {
                    padding-top: 30px;
                    width: 100%;
                    text-align: justify;
                    color: #331612;



                    >.part-li {
                        margin-right: 20px;
                        min-width: 24px;
                        text-align: center;
                        height: 24px;
                        line-height: 24px;
                        border-radius: 12px;
                        font-size: 14px;
                        color: #fff;
                        border-radius: 50%;
                        display: inline-block;
                        background-color: #ff4287;
                    }

                    >img {
                        border-radius: 6px;
                        width: 90px;
                        height: 110px;
                        margin-right: 20px;
                        margin-bottom: 15px;

                    }

                    >ul {
                        >.part-la {
                            color: #323038;
                            font-size: 14px;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            display: -webkit-box;
                            line-clamp: 2;
                            -webkit-line-clamp: 2;
                            -webkit-box-orient: vertical;
                            margin-bottom: 5px;
                        }

                        >li {
                            color: #777;
                            line-height: 20px;
                            font-size: 12px;
                        }
                    }

                }


                >.right-part-li2 {
                    padding-top: 30px;
                    width: 100%;
                    color: #331612;

                    >.part-li {
                        margin-right: 20px;
                        min-width: 24px;
                        text-align: center;
                        height: 24px;
                        line-height: 24px;
                        border-radius: 12px;
                        font-size: 14px;
                        color: #fff;
                        border-radius: 50%;
                        display: inline-block;
                        background-color: #ff4287;
                    }

                    >ul {
                        >.part-la {
                            color: #323038;
                            font-size: 14px;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            display: -webkit-box;
                            -webkit-line-clamp: 1;
                            -webkit-box-orient: vertical;
                            margin-bottom: 5px;
                        }

                        >li {
                            color: #777;
                            line-height: 20px;
                            font-size: 12px;
                        }
                    }

                }

            }
        }
    }

    >.section {
        display: flex;
        flex-direction: column;
        padding: 40px 0 40px 0;

        >.part-section {
            justify-content: space-between;
            align-items: center;

            >p {
                font-size: 30px;
                height: 40px;
                line-height: 40px;
                display: block;
            }

            >a {
                font-size: 20px;
            }
        }

        >.part-section-zi {

            justify-content: space-between;

            >.part-section-li {
                display: block;
                width: 14%;
                margin-top: 30px;

                >.section-li {
                    position: relative;

                    >img {
                        width: 100%;
                        border-radius: 6px;
                    }

                    >.section-ss {
                        position: absolute;
                        display: flex;
                        flex-direction: column;
                        width: 34px;
                        height: 45px;
                        background-color: #ff4287;
                        left: 5%;
                        align-items: center;

                        >.ss {
                            font-size: 20px;
                        }

                        >div {
                            font-size: 11px;
                            line-height: 20px;
                            color: #fff;
                        }

                    }
                }


                >.section-li2 {
                    margin-top: 10px;
                    line-height: 22px;

                    >p {
                        overflow: hidden;
                        text-overflow: ellipsis;
                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        line-clamp: 2;
                        -webkit-box-orient: vertical;
                        width: 150px;
                        flex-wrap: wrap;
                        font-size: 10px;
                    }

                }

                >.section-li3 {
                    padding-top: 5px;
                    color: #ff4655;
                    align-items: flex-end;

                    >span:nth-child(1) {
                        font-size: 20px;
                        line-height: 20px;
                    }

                    >span {
                        font-size: 0.7em;
                    }
                }
            }
        }
    }

    >.show {
        margin-top: 30px;
        display: flex;
        flex-direction: column;
        padding: 30px 0 30px 0;


        >.part-show {
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;

            >p {
                font-size: 30px;
                height: 40px;
                line-height: 40px;
                display: block;
            }

            >a {
                font-size: 20px;
            }
        }

        >.part-show-zi {
            >.part-show-li {
                position: relative;

                >img {
                    width: 250px;
                    height: 350px;
                    border-radius: 5px;

                }

                >div {
                    position: absolute;
                    bottom: 10px;
                    font-size: 14px;
                    line-height: 20px;
                    color: #fff;
                    padding: 10px;
                }
            }

            >.part-show-li2 {
                flex-wrap: wrap;
                justify-content: space-between;

                >.show-li2 {
                    padding-left: 30px;
                    width: 30%;
                    padding-bottom: 42px;
                    text-align: justify;
                    color: #331612;

                    >img {
                        border-radius: 6px;
                        width: 109px;
                        height: 154px;
                    }

                    >div {
                        position: relative;
                        padding: 0 30px 0 0;

                        >ul {
                            margin-bottom: 10px;
                            padding-left: 20px;

                            >.part-la {
                                width: 110px;
                                color: #323038;
                                font-size: 14px;
                                overflow: hidden;
                                text-overflow: ellipsis;
                                display: -webkit-box;
                                line-clamp: 2;
                                -webkit-line-clamp: 2;
                                -webkit-box-orient: vertical;
                                margin-bottom: 18px;
                            }

                            >li {
                                color: #777;
                                line-height: 20px;
                                font-size: 12px;
                            }
                        }

                        >.part-li2 {
                            padding-left: 15px;
                            position: absolute;
                            margin-top: 75%;
                            color: #ff4655;
                            align-items: self-end;


                            >span:nth-child(1) {
                                font-size: 20px;
                                line-height: 20px;

                            }

                            >span {
                                font-size: 0.7em;
                            }
                        }

                    }

                }
            }
        }

    }

    >.page {
        display: flex;
        flex-direction: column;
        padding: 30px 0 30px 0;

        >p {
            font-size: 30px;
            height: 40px;
            line-height: 40px;
            display: block;
            margin-bottom: 40px;
        }

        >.page-section {
            >.page-section-left {
                margin-right: 20px;
                width: 450px;
                height: 360px;
            }

            >.page-section-right {
                display: flex;
                flex-direction: column;
                margin-left: 40px;

                >.page-show-li {
                    justify-content: space-between;

                    >div {
                        margin-bottom: 40px;
                        font-size: 18px;

                        >span {
                            color: #ff4287;
                            margin: 0 10px 0 10px;
                        }
                    }
                }

                >.page-show-li2 {
                    display: flex;
                    padding-bottom: 42px;
                    text-align: justify;
                    justify-content: space-between;

                    >.show-li2 {
                        flex-direction: column;
                        width: 20%;



                        >img {
                            width: 100%;
                            margin-bottom: 10px;
                            border-radius: 6px;
                        }

                        >ul {
                            margin-bottom: 10px;

                            >.part-la {
                                color: #777;
                                font-size: 12px;
                                overflow: hidden;
                                text-overflow: ellipsis;
                                display: -webkit-box;
                                line-clamp: 2;
                                -webkit-line-clamp: 2;
                                -webkit-box-orient: vertical;
                            }

                            >li {
                                margin-top: 5px;
                                color: #777;
                                font-size: 12px;
                            }
                        }
                    }
                }
            }
        }
    }

    >.small {
        width: 100%;
        display: inline-flex;
        flex-direction: column;
        margin-top: 50px;

        >img:nth-child(2) {
            width: 100%;
            margin: 0 auto;
        }

        >img:nth-child(2) {
            width: 760px;
            margin: 0 auto;
        }
    }
}
</style>